<?php
class Image extends Eloquent
{
    public static $timestamps = false;

    public function house()
    {
        return $this->belongs_to('House');
    }

    public function get_url()
    {
        $url = $this->get_attribute('image_url');
        if (!starts_with($url, 'http')) {
            $url = asset($url);
        }

        return $url;
    }
}